package tj.eskhata.pos.domain;

// Generated 06.07.2010 15:48:41 by Hibernate Tools 3.3.0.GA

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ClPoint generated by hbm2java
 */
@Entity
@Table(name = "CL_POINT", schema = "MTA")
public class ClPoint implements DomainObject {

	private Long id;
	private ClPart clPart;
	private Long partId;
	private Town town;
	private String code;
	private String name;
	private Long statusId;
	private Long accArrId;
	private String key;
	private Date keyDateBeg;
	private Date keyDateEnd;
	private String keyStatus;
	private String cashDoc;
	private String adress;

	public ClPoint() {
	}

	public ClPoint(Long id) {
		this.id = id;
	}

	public ClPoint(Long id, ClPart clPart, Town town, String code,
			String name, Long statusId, Long accArrId, String key,
			Date keyDateBeg, Date keyDateEnd, String keyStatus, String cashDoc,
			String adress) {
		this.id = id;
		this.clPart = clPart;
		this.town = town;
		this.code = code;
		this.name = name;
		this.statusId = statusId;
		this.accArrId = accArrId;
		this.key = key;
		this.keyDateBeg = keyDateBeg;
		this.keyDateEnd = keyDateEnd;
		this.keyStatus = keyStatus;
		this.cashDoc = cashDoc;
		this.adress = adress;
	}

	@Id
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PART_ID")
	public ClPart getClPart() {
		return this.clPart;
	}

	public void setClPart(ClPart clPart) {
		this.clPart = clPart;
	}

	@Column(name = "PART_ID", precision = 22, scale = 0, insertable=false,updatable=false)
	public Long getPartId() {
		return this.partId;
	}
	public void setPartId(Long partId) {
		this.partId = partId;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TOWN_ID")
	public Town getTown() {
		return this.town;
	}

	public void setTown(Town town) {
		this.town = town;
	}

	@Column(name = "CODE", length = 20)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "NAME", length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "STATUS_ID", precision = 22, scale = 0)
	public Long getStatusId() {
		return this.statusId;
	}

	public void setStatusId(Long statusId) {
		this.statusId = statusId;
	}

	@Column(name = "ACC_ARR_ID", precision = 22, scale = 0)
	public Long getAccArrId() {
		return this.accArrId;
	}

	public void setAccArrId(Long accArrId) {
		this.accArrId = accArrId;
	}

	@Column(name = "KEY", length = 60)
	public String getKey() {
		return this.key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "KEY_DATE_BEG", length = 7)
	public Date getKeyDateBeg() {
		return this.keyDateBeg;
	}

	public void setKeyDateBeg(Date keyDateBeg) {
		this.keyDateBeg = keyDateBeg;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "KEY_DATE_END", length = 7)
	public Date getKeyDateEnd() {
		return this.keyDateEnd;
	}

	public void setKeyDateEnd(Date keyDateEnd) {
		this.keyDateEnd = keyDateEnd;
	}

	@Column(name = "KEY_STATUS", length = 1)
	public String getKeyStatus() {
		return this.keyStatus;
	}

	public void setKeyStatus(String keyStatus) {
		this.keyStatus = keyStatus;
	}

	@Column(name = "CASH_DOC", length = 1)
	public String getCashDoc() {
		return this.cashDoc;
	}

	public void setCashDoc(String cashDoc) {
		this.cashDoc = cashDoc;
	}

	@Column(name = "ADRESS", length = 64)
	public String getAdress() {
		return this.adress;
	}

	public void setAdress(String adress) {
		this.adress = adress;
	}

}
